﻿
/*
set @db := 'mozlite';
set @tb := 'mozlite_forums';
#Properties
select concat('public string ', column_name, '{get;set;}')
from `columns`
where table_schema = @db  and table_name = @tb;
#IDataReader
select concat('this.', column_name, ' = reader.GetString("', column_name,'","',ifnull(column_default,0), '"); ')
from `columns`
where table_schema = @db  and table_name = @tb;
#Insert
select concat('`',column_name,'`,') as `fields`, concat('''{',ordinal_position,'}'',') as `formats`, concat('Q(entry.',column_name,'),') as `values`
from `columns`
where table_schema = @db  and table_name = @tb;
#Updated
select concat('`',column_name,'` = ''{', ordinal_position, '}'',') as `fields`, concat('Q(entry.',column_name,'),') as `values`
from `columns`
where table_schema = @db  and table_name = @tb;
*/